<template>
  <div class="not-found">
    <h1>404 - 页面未找到</h1>
    <p>抱歉，您访问的页面不存在。</p>
    <router-link to="/" class="back-home">返回首页</router-link>
  </div>
</template>

<script>
export default {
  name: 'NotFound',
  created() {
    this.setTitle()
  },
  methods: {
    setTitle() {
      document.title = '404 - 页面未找到'
    }
  }
}
</script>

<style scoped>
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-family: Arial, sans-serif;
  background-color: #f8f9fa;
}

h1 {
  font-size: 3rem;
  color: #343a40;
}

p {
  font-size: 1.2rem;
  color: #6c757d;
  margin-top: 1rem;
}

.back-home {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease;
}

.back-home:hover {
  background-color: #0056b3;
}
</style>
